00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00032 define("PATH_TO_ROOT", "../");
00034 require_once (PATH_TO_ROOT."common/init.inc.php");
00035
00036 require_once (PATH_TO_ROOT."calendar/classes/class.template.inc.php");
00037
00039 include_once ("./classes/class.filemanger.inc.php");
00040 $filemanager = new Filemanager();
00041 if (isset($_GET['action']) && $_GET['action'] == 'getfile' && isset($_GET['actionID'])) {
00042 $ERROR = $filemanager->downloadFile($_GET['actionID']);
00043 if (trim($ERROR) == "") exit();
00044 } elseif (isset($_GET['action']) && $_GET['action'] == 'getlink' && isset($_GET['actionID'])) {
00045 $ERROR = $filemanager->openLink($_GET['actionID']);
00046 if (trim($ERROR) == "") exit();
00047 }
00048 if (isset($_GET['action']) && $_GET['action'] == "downloadFolder" && $_GET['actionID']) {
00049 $ERROR = $filemanager->getArchivedFolder($_GET['actionID'], false);
00050 if (trim($ERROR) == "") exit();
00051 }
00052 if (isset($_GET['action']) && $_GET['action'] == "recursiveDownloadFolder" && $_GET['actionID'] && $settings['filemanager_recursive']) {
00053 $ERROR = $filemanager->getArchivedFolder($_GET['actionID'], true);
00054 if (trim($ERROR) == "") exit();
00055 }
00056 if (isset($_POST['action']) && ($_POST["action"] == "delete_trueFile" || $_POST["action"] == "delete_trueFolder")) {
00057 $ERROR = $filemanager->runAction($db->get_row("SELECT * FROM filelist WHERE fileID='".$_POST["actionID"]."'"), 1, $_POST["action"], $_POST["actionID"] );
00058 unset($_GET["action"]);
00059 }
00060
00061 $HEADER_INLINE_AFTER_CSS='<link href="'.PATH_TO_ROOT. 'ressourcen/templates/css/filemanager.css" rel="stylesheet" type="text/css" />';
00063 require_once (PATH_TO_ROOT."common/header.inc.php");
00064
00065 if ($_SESSION['course'] == 0) {
00066 $courseStr = "Foyer";
00067 } else {
00068 $courseStr = $db->get_var("SELECT name FROM courses WHERE ID='".$_SESSION['course']."'");
00069 }
00070
00071 echo "<div class='contentTable'>";
00072 echo "<div class='tableHead'>Ressourcen - ".$courseStr."</div>";
00073 if (isset($ERROR) && trim($ERROR) != "") {
00074 Output::errorMessage($ERROR, 2);
00075 unset($ERROR);
00076 }
00077
00078 echo "<div class='res_frame-tree'>";
00079 $filemanager->showTree();
00080 echo "</div>";
00081
00082 echo "<div class='res_frame-file'>";
00083 if (isset($_GET['activeFolder'])) $ERROR = $filemanager->showFiles();
00084 if (isset($ERROR) && trim($ERROR) != "") {
00085 Output::errorMessage($ERROR, 2, false, true);
00086 }
00087 echo "</div>
00088 </div>";
00089
00091 require_once (PATH_TO_ROOT."common/footer.inc.php");
00092 ?>